#https://blog.csdn.net/weixin_40485472/article/details/81203314
import  numpy as np
def orthogonal(shape):
    flat_shape = (shape[0], np.prod(shape[1:]))

    a = np.random.normal(0.0, 1.0, flat_shape)

    u, _, v = np.linalg.svd(a, full_matrices=False)

    q = u if u.shape == flat_shape else v

    return q.reshape(shape)